home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / Telephones.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  48.2 KB  |  1,285 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Telephones.h
  3.  
  4.      Contains:    Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __TELEPHONES__
  18. #define __TELEPHONES__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __DIALOGS__
  24. #include <Dialogs.h>
  25. #endif
  26. #ifndef __ERRORS__
  27. #include <Errors.h>
  28. #endif
  29. #ifndef __EVENTS__
  30. #include <Events.h>
  31. #endif
  32. #ifndef __CTBUTILITIES__
  33. #include <CTBUtilities.h>
  34. #endif
  35. #ifndef __COMPONENTS__
  36. #include <Components.h>
  37. #endif
  38.  
  39.  
  40.  
  41. #if PRAGMA_ONCE
  42. #pragma once
  43. #endif
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48.  
  49. #if PRAGMA_IMPORT
  50. #pragma import on
  51. #endif
  52.  
  53. #if PRAGMA_STRUCT_ALIGN
  54.     #pragma options align=mac68k
  55. #elif PRAGMA_STRUCT_PACKPUSH
  56.     #pragma pack(push, 2)
  57. #elif PRAGMA_STRUCT_PACK
  58.     #pragma pack(2)
  59. #endif
  60.  
  61.  
  62. enum {
  63.     curTELVersion                = 3,                            /* current Telephone Manager version */
  64.                                                                 /*    the chooseXXX symbols are defined in CTBUtilities.(pah) */
  65.     telChooseDisaster            = chooseDisaster,
  66.     telChooseFailed                = chooseFailed,
  67.     telChooseAborted            = chooseAborted,
  68.     telChooseOKMinor            = chooseOKMinor,
  69.     telChooseOKMajor            = chooseOKMajor,
  70.     telChooseCancel                = chooseCancel,
  71.     telChooseOKTermChanged        = 4
  72. };
  73.  
  74. #ifndef classTEL
  75.  
  76. enum {
  77.                                                                 /* telephone tool file type */
  78.     classTEL                    = FOUR_CHAR_CODE('vbnd')
  79. };
  80.  
  81. #endif  /* !defined(classTEL) */
  82.  
  83.  
  84. enum {
  85.                                                                 /* PHYSICAL TERMINAL CONSTANTS */
  86.                                                                 /* INDEPENDENT HANDSET CONSTANTS */
  87.     telIndHSOnHook                = 0,                            /* independent handset on hook */
  88.     telIndHSOffHook                = 1,                            /* independent handset off hook */
  89.     telIndHSDisconnected        = 0,                            /* handset disconnected from the line */
  90.     telIndHSConnected            = 1,                            /* handset connected to the line */
  91.                                                                 /* HOOK STATE CONSTANTS */
  92.     telHandset                    = 1,                            /* handset hookswitch */
  93.     telSpeakerphone                = 2,                            /* speakerphone 'on' switch */
  94.     telDeviceOffHook            = 1,                            /* device off hook */
  95.     telDeviceOnHook                = 0,                            /* device on hook */
  96.                                                                 /* VOLUME CONTROL CONSTANTS */
  97.     telHandsetSpeakerVol        = 1,                            /* volume of the handset speaker */
  98.     telHandsetMicVol            = 2,                            /* sensitivity of the handset mic */
  99.     telSpeakerphoneVol            = 3,                            /* speakerphone volume */
  100.     telSpeakerphoneMicVol        = 4,                            /* sensitivity of the spkrphone mic */
  101.     telRingerVol                = 5,                            /* volume of the ringer */
  102.     telBuiltinSPVol                = 6,                            /* volume of the built-in speakerphone */
  103.     telBuiltinSPMicVol            = 7,                            /* sensitivity of the built-in speakerphone mic */
  104.     telVolSame                    = 0,                            /* leaves the volume at previous level */
  105.     telVolMin                    = 1,                            /* turns volume down to minimum level, but not off */
  106.     telVolMax                    = 100,                            /* highest level allowed by the Telephone Manager */
  107.     telVolStateSame                = 0,                            /* leaves device in same state */
  108.     telVolStateOff                = 1,                            /* turns the device off , */
  109.                                                                 /* but doesn't change the volume setting. */
  110.                                                                 /* Use for mute functions. */
  111.     telVolStateOn                = 2,                            /* turns the device on.  Volume setting is */
  112.                                                                 /* the same as previously set.*/
  113.                                                                 /* DISPLAY CONSTANTS */
  114.     telNormalDisplayMode        = 1,                            /* normal display mode */
  115.     telInspectMode                = 2,                            /* inspect display mode */
  116.     telMiscMode                    = 3,                            /* miscellaneous display mode */
  117.     telRetrieveMode                = 4,                            /* message retrieval mode */
  118.     telDirectoryQueryMode        = 5,                            /* electronic directory mode */
  119.     telEntireDisplay            = 0,                            /* entire Display */
  120.                                                                 /* KEY PRESS CONSTANTS */
  121.     telHangupKey                = 1,                            /* drop, or release, key pressed */
  122.     telHoldKey                    = 2,                            /* hold key pressed */
  123.     telConferenceKey            = 3,                            /* conference key pressed */
  124.     telTransferKey                = 4,                            /* transfer key pressed */
  125.     telForwardKey                = 5,                            /* call forward key pressed */
  126.     telCallbackKey                = 6,                            /* call back key pressed */
  127.     telDNDKey                    = 7,                            /* do not disturb key pressed */
  128.     telCallPickupKey            = 8,                            /* call Pickup key pressed */
  129.     telCallParkKey                = 9,                            /* call Park key pressed */
  130.     telCallDeflectKey            = 10,                            /* call Deflect key pressed */
  131.     telVoiceMailAccessKey        = 11,                            /* voice Mail Access key pressed */
  132.     telCallRejectKey            = 12,                            /* call Reject key pressed */
  133.     telOtherKey                    = 16,                            /* other key pressed */
  134.     telKeyPadPress                = 1,                            /* key pressed on 12 digit keypad*/
  135.     telFeatureKeyPress            = 2,                            /* feature Key Pressed */
  136.     telTerminalEnabled            = 0,
  137.     telTerminalDisabled            = 1,
  138.     telUnknown                    = 0,                            /* unknown error */
  139.     telTerminalHWDisconnected    = 1,                            /* terminal hardware is disconnected */
  140.     telDeviceDriverClosed        = 2,                            /* device driver is closed */
  141.                                                                 /* ALERT PATTERN */
  142.     telPattern0                    = 0,
  143.     telPattern1                    = 1,
  144.     telPattern2                    = 2,
  145.     telPattern3                    = 3,
  146.     telPattern4                    = 4,
  147.     telPattern5                    = 5,
  148.     telPattern6                    = 6,
  149.     telPattern7                    = 7,
  150.     telPatternOff                = 8,
  151.     telPatternUndefined            = 15,                            /* DN TYPES */
  152.     telAllDNs                    = 0,                            /* counts all types of DNs */
  153.     telInternalDNs                = 1,                            /* connected to PBX or other non-public switch */
  154.     telInternalDNsOnly            = 2,                            /* connected to PBX or other non-public switch */
  155.                                                                 /* and able to place internal calls only */
  156.     telExternalDNs                = 3,                            /* connected to public network */
  157.     telDNTypeUnknown            = 4,                            /* DN type unknown */
  158.                                                                 /* DN USAGE */
  159.     telDNNotUsed                = 0,                            /* DN is not used - onhook */
  160.     telDNPOTSCall                = 1,                            /* DN used for POTs call */
  161.     telDNFaxCall                = 2,                            /* DN used for fax call */
  162.     telDNDataCall                = 3,                            /* DN used for data call */
  163.     telDNAlerting                = 4,                            /* Incoming call at DN */
  164.     telDNUnknownState            = 5,                            /* DN is in unknown state */
  165.                                                                 /* CALL FORWARDING TYPES */
  166.     telForwardImmediate            = 1,                            /* immediately forward calls */
  167.     telForwardBusy                = 2,                            /* forward on Busy */
  168.     telForwardNoAnswer            = 3,                            /* forward on No answer */
  169.     telForwardBusyNA            = 4,                            /* forwarding for busy and no answer*/
  170.     telForwardTypeUnknown        = 5,                            /* type of forwarding is unknown */
  171.                                                                 /* CALL FORWARDING MESSAGES */
  172.     telForwardCleared            = 0,                            /* forwarding has been cleared */
  173.     telForwardEst                = 1,                            /* forwarding has been established*/
  174.     telForwardFailed            = 2,                            /* attempt to setup forwarding has failed*/
  175.                                                                 /* DO NOT DISTURB TYPES */
  176.     telDNDIntExt                = 0,                            /* do not disturb for all internal and external calls*/
  177.     telDNDExternal                = 1,                            /* do not disturb for external calls only */
  178.     telDNDInternal                = 2,                            /* do not disturb for internal calls only */
  179.     telDNDNonIntercom            = 3,                            /* do not disturb for all calls except intercom */
  180.                                                                 /* DO NOT DISTURB MESSAGES */
  181.     telDNDCleared                = 0,                            /* do not disturb has been cleared */
  182.     telDNDEst                    = 1,                            /* do not disturb has been established */
  183.     telDNDFailed                = 2,                            /* attempt to setup do not disturb has failed */
  184.                                                                 /* VOICE MAIL MESSAGES */
  185.     telAllVoiceMessagesRead        = 0,                            /* all messages have been read, none are  waiting */
  186.                                                                 /* to be read */
  187.     telNewVoiceMessage            = 1,                            /* a new message has arrived or messages are waiting */
  188.                                                                 /* for this DN */
  189.                                                                 /* DNSELECT MESSAGE */
  190.     telDNDeselected                = 0,                            /* DN has been deselected */
  191.     telDNSelected                = 1,                            /* DN has been selected */
  192.                                                                 /* CALL ORIGINATORS */
  193.     telInternalCall                = 0,                            /* return nth internal CA */
  194.     telExternalCall                = 1,                            /* return nth external CA */
  195.     telUnknownCallOrigin        = 2,                            /* unknown call type */
  196.     telAllCallOrigins            = 2,                            /* return nth CA internal or external */
  197.                                                                 /* CALL TYPES */
  198.     telVoiceMailAccessOut        = (-7),
  199.     telPageOut                    = (-6),
  200.     telIntercomOut                = (-5),
  201.     telCallbackOut                = (-4),
  202.     telPickup                    = (-3),
  203.     telParkRetrieve                = (-2),
  204.     telNormalOut                = (-1),
  205.     telUnknownCallType            = 0,
  206.     telNormalIn                    = 1,
  207.     telForwardedImmediate        = 2,
  208.     telForwardedBusy            = 3,
  209.     telForwardedNoAnswer        = 4,
  210.     telTransfer                    = 5,
  211.     telDeflected                = 6,
  212.     telIntercepted                = 7,
  213.     telDeflectRecall            = 8,
  214.     telParkRecall                = 9,
  215.     telTransferredRecall        = 10,
  216.     telIntercomIn                = 11,
  217.     telCallbackIn                = 12,                            /* DIAL TYPES */
  218.     telDNDialable                = 0,                            /* this DN could be dialed via TELSetupCall */
  219.     telDNNorthAmerican            = 1,                            /* rmtDN is standard North America 10 digit number */
  220.     telDNInternational            = 2,                            /* rmtDN is an international number */
  221.     telDNAlmostDialable            = 3,                            /* rmtDN is almost dialable, */
  222.                                                                 /* missing prefix such as 9 or 1 */
  223.     telDNUnknown                = 15,                            /* unknown whether DN is dialable */
  224.                                                                 /* CALL PROGRESS MESSAGES */
  225.     telCAPDialTone                = 1,                            /* dial tone */
  226.     telCAPRinging                = 2,                            /* destination CA is alerting */
  227.     telCAPDialing                = 3,                            /* dialing the other end */
  228.     telCAPReorder                = 4,                            /* reorder */
  229.     telCAPBusy                    = 5,                            /* busy */
  230.     telCAPRouted                = 6,                            /* call routed; rmtDN will hold the routing directory */
  231.                                                                 /* number routeDN and routePartyName have been updated */
  232.     telCAPRoutedOff                = 7,                            /* call routed off-network; no further progress will */
  233.                                                                 /* be available */
  234.     telCAPTimeout                = 8,                            /* call timed out */
  235.     telCAPUpdate                = 9,                            /* name and rmtDN information has been updated */
  236.     telCAPPrompt                = 10,                            /* the network is prompting for more information */
  237.     telCAPWaiting                = 11,                            /* call is proceeding, but there is no response yet */
  238.                                                                 /* from the destination */
  239.     telCAPCPC                    = 12,                            /* telephone tool detected CPC signal */
  240.     telCAPNoDialTone            = 13,                            /* dial tone not detected */
  241.     telCAPUnknown                = 15,                            /* call progress state unknown */
  242.     telCAPDialDisabled            = 16,                            /* Blacklisting: Dial Disabled */
  243.     telCAPBlacklistedNumber        = 17,                            /* Blacklisting: Blacklisted Number */
  244.     telCAPForbiddenNumber        = 18,                            /* Blacklisting: Forbidden Number */
  245.     telCAPModemGuardTime        = 19,                            /* Modem Guard Timein force, unable to dial */
  246.     telCAPLCDetected            = 20,                            /* trying to dial a number while the handset is offhook */
  247.     telCAPLostLC                = 21,                            /* trying manual dial or answer while handset not off hook */
  248.                                                                 /* or also lost line current during dialing. */
  249.                                                                 /* OUTGOING CALL MESSAGES */
  250.     telPhysical                    = 0,                            /* user lifted handset and initiated call */
  251.     telProgrammatic                = 1,                            /* programmatic initiation of outgoing call */
  252.                                                                 /* DISCONNECT MESSAGES */
  253.     telLocalDisconnect            = 0,                            /* local party, this user, responsible for disconnect */
  254.     telRemoteDisconnect            = 1,                            /* remote party responsible for disconnect */
  255.                                                                 /* DISCONNECT TYPES */
  256.     telCADNormal                = 1,                            /* normal disconnect */
  257.     telCADBusy                    = 2,                            /* remote user busy */
  258.     telCADNoResponse            = 3,                            /* remote not responding */
  259.     telCADRejected                = 4,                            /* call rejected */
  260.     telCADNumberChanged            = 5,                            /* number changed */
  261.     telCADInvalidDest            = 6,                            /* invalid destination address */
  262.     telCADFacilityRejected        = 7,                            /* requested facility rejected */
  263.     telCADUnobtainableDest        = 9,                            /* destination not obtainable */
  264.     telCADCongested                = 10,                            /* network congestion */
  265.     telCADIncompatibleDest        = 11,                            /* incompatible destination */
  266.     telCADTimeout                = 12,                            /* call timed out */
  267.     telCADUnknown                = 15,                            /* reason unknown */
  268.                                                                 /* CONFERENCE MESSAGES */
  269.     telConferencePrepFailed        = 0,                            /* conference could not be prepared */
  270.     telConferencePending        = 1,                            /* conference prepared successfully */
  271.     telConferenceEstFailed        = 2,                            /* conference could not be established */
  272.     telConferenceEst            = 3,                            /* conference established */
  273.                                                                 /* TRANSFER MESSAGES */
  274.     telTransferPrepFailed        = 0,                            /* transfer could not be prepared */
  275.     telTransferPending            = 1,                            /* transfer prepared successfully */
  276.     telTransferEst                = 2,                            /* consult or blind xfer successful */
  277.     telTransferFailed            = 3,                            /* consult or blind xfer failed */
  278.     telTransferred                = 4,                            /* message to originator of CA specifying */
  279.                                                                 /* that call was transferred to rmtDN */
  280.                                                                 /* HOLD MESSAGES */
  281.     telHoldCleared                = 0,
  282.     telHoldEst                    = 1,
  283.     telHoldFailed                = 2,                            /* RECEIVE DIGIT MESSAGES */
  284.     telDigitAudible                = 0,
  285.     telDigitNotAudible            = 1,                            /* CALL PARK MESSAGES */
  286.     telCallParkEst                = 1,                            /* call has been successfully parked */
  287.     telCallParkRetrieveEst        = 2,                            /* parked Call has been successfully retrieved */
  288.     telCallParkFailed            = 3,                            /* attempt to setup call park has failed */
  289.     telCallParkRetrieveFailed    = 4,                            /* attempt to retrieve parked call failed */
  290.     telCallParkRecall            = 5,                            /* call park has been recalled */
  291.                                                                 /* CALL BACK MESSAGES */
  292.     telCallbackCleared            = 0,                            /* call back has been cleared */
  293.     telCallbackEst                = 1,                            /* call back has been established */
  294.     telCallbackNowAvail            = 2,                            /* call can be called back with TELCallBackNow */
  295.                                                                 /* if CA is zero, else call IS calling back on CA */
  296.     telCallbackFailed            = 3,                            /* attempt to setup callback has failed */
  297.     telCallbackDesired            = 4,                            /* a user has called this terminal, received no */
  298.                                                                 /* answer and desires this terminal to call it */
  299.                                                                 /* back */
  300.     telCallbackDesiredCleared    = 5,                            /* call back for no answer no longer desired */
  301.     telCalledback                = 6,                            /* callback has occurred successfully */
  302.                                                                 /* CALL REJECT MESSAGES */
  303.     telCallRejectFailed            = 0,                            /* attempt to reject call has failed */
  304.     telCallRejectEst            = 1,                            /* call successfully rejected */
  305.     telCallRejected                = 2,                            /* message to originator that call was rejected */
  306.                                                                 /* CALL DEFLECT MESSAGES */
  307.     telCallDeflectFailed        = 0,                            /* attempt to deflect call has failed */
  308.     telCallDeflectEst            = 1,                            /* call successfully deflected */
  309.     telCallDeflectRecall        = 2,                            /* deflected call has been recalled */
  310.     telCallDeflected            = 3,                            /* message to originator that call was deflected */
  311.                                                                 /* to rmtDN */
  312.     telAutoDeflectImmediate        = 4,                            /* a call was automatically deflected from this */
  313.                                                                 /* terminal as a result of immediate call */
  314.                                                                 /* forwarding */
  315.     telAutoDeflectBusy            = 5,                            /* a call was automatically deflected from this */
  316.                                                                 /* terminal as a result of call forwarding on busy */
  317.     telAutoDeflectNoAnswer        = 6,                            /* a call was automatically deflected from this */
  318.                                                                 /* terminal as a result of call forwarding on */
  319.                                                                 /* no answer */
  320.                                                                 /* CONFERENCE SPLIT MESSAGES */
  321.     telConferenceSplitFailed    = 0,                            /* CA could not be split */
  322.     telConferenceSplitEst        = 1,                            /* CA split successfully */
  323.                                                                 /* CONFERENCE DROP MESSAGES */
  324.     telConferenceDropFailed        = 0,                            /* CA could not be dropped */
  325.     telConferenceDropped        = 1,                            /* CA dropped successfully */
  326.                                                                 /* CALL PICKUP MESSAGES */
  327.     telCallPickupEst            = 0,                            /* call pickup was successful */
  328.     telCallPickupFailed            = 1,                            /* call pickup failed */
  329.     telCallPickedUp                = 2,                            /* message to originator that call was picked */
  330.                                                                 /* up at a different DN */
  331.                                                                 /* PAGING MESSAGES */
  332.     telPageEst                    = 0,                            /* paging was successful */
  333.     telPageComplete                = 1,                            /* paging activity completed */
  334.     telPageFailed                = 2,                            /* paging failed */
  335.                                                                 /* INTERCOM MESSAGES */
  336.     telIntercomEst                = 0,                            /* intercom was successful */
  337.     telIntercomComplete            = 1,                            /* intercom activity completed */
  338.     telIntercomFailed            = 2,                            /* intercom failed */
  339.                                                                 /* MODEM TONE MESSAGES */
  340.     telModemToneDetected        = 0,                            /* modem tone was detected */
  341.     telModemToneCleared            = 1,                            /* modem tone went away */
  342.                                                                 /* FAX TONE MESSAGES */
  343.     telFaxToneDetected            = 0,                            /* fax tone was detected */
  344.     telFaxToneCleared            = 1,                            /* fax tone went away */
  345.                                                                 /* IN USE MESSAGES */
  346.     telInUsePrivate                = 0,                            /* MADN is in use and can't be accessed */
  347.     telInUseCanAccess            = 1,                            /* MADN is in use, and others can access it */
  348.                                                                 /* and join in */
  349.     telInUseCanMakePrivate        = 2,                            /* MADN is in use, but available for any one */
  350.                                                                 /* person to access */
  351.     telInUseCleared                = 3,                            /* MADN is no longer in use */
  352.                                                                 /* CALL APPEARANCE STATES */
  353.     telCAIdleState                = 0,                            /* a call doesn't exist at this time */
  354.     telCAInUseState                = 1,                            /* the call is active but at another terminal */
  355.     telCAOfferState                = 2,                            /* a call is being offered to the terminal */
  356.     telCAQueuedState            = 3,                            /* a call is being queued at this terminal */
  357.     telCAAlertingState            = 4,                            /* a call is alerting at the terminal */
  358.     telCADialToneState            = 5,                            /* initiated outgoing call has dialtone */
  359.     telCADialingState            = 6,                            /* initiated outgoing call is dialing */
  360.     telCAWaitingState            = 7,                            /* initiated outgoing call is waiting for */
  361.                                                                 /* response from destination */
  362.     telCARingingState            = 8,                            /* the outgoing call is ringing. */
  363.     telCABusyState                = 9,                            /* destination is busy or can't be reached */
  364.     telCAHeldState                = 10,                            /* call has been put on hold by this terminal */
  365.     telCAConferencedState        = 11,                            /* this CA is part of a conference now */
  366.     telCAActiveState            = 12,                            /* the call is active and parties are free */
  367.                                                                 /* to exchange data */
  368.     telCAReorderState            = 13,                            /* CA is in a reorder state */
  369.     telCAConferencedHeldState    = 14,                            /* CA is a conference call in a held state */
  370.     telCAUnknownState            = 15,                            /* the call state is unknown */
  371.                                                                 /* TERMINAL MESSAGE EVENTMASKS */
  372.     telTermHookMsg                = 0x00000001,                    /* the hookswitch state has changed */
  373.     telTermKeyMsg                = 0x00000002,                    /* a phone pad key has been depressed */
  374.     telTermVolMsg                = 0x00000004,                    /* volume setting has changed */
  375.     telTermDisplayMsg            = 0x00000008,                    /* display has changed */
  376.     telTermEnableMsg            = 0x00000010,                    /* terminal has become enabled */
  377.     telTermOpenMsg                = 0x00000020,                    /* terminal has been opened */
  378.     telTermCloseMsg                = 0x00000040,                    /* terminal is shutting down */
  379.     telTermResetMsg                = 0x00000080,                    /* terminal has been reset */
  380.     telTermErrorMsg                = 0x00000100,                    /* hard equipment error */
  381.     telTermIndHSStateChgMsg        = 0x00000200,                    /* change in handset state from inacive to */
  382.                                                                 /* active or vice versa */
  383.     telTermIndHSConnectMsg        = 0x00000400,                    /* independent handset connection has been changed */
  384.     telTermKeyImmMsg            = 0x00000800,                    /* immidiate arrival of phone pad key */
  385.     telTermVolStateMsg            = 0x00001000,                    /* volume state has changed */
  386.     telTermOtherMsg                = (long)0x80000000,                /* vendor defined error */
  387.     telAllTermMsgs                = 0x00001FFF,                    /* mask to all non tool specific terminal events */
  388.                                                                 /* DN MESSAGE EVENTMASK CONSTANTS */
  389.     telDNForwardMsg                = 0x00000001,                    /* forward feature activity */
  390.     telDNDNDMsg                    = 0x00000002,                    /* do not disturb feature activity */
  391.     telDNVoiceMailMsg            = 0x00000004,                    /* message has arrived for this DN */
  392.     telDNSelectedMsg            = 0x00000008,                    /* DN has been selected or deselected */
  393.     telDNOtherMsg                = (long)0x80000000,                /* a custom message for use by tools */
  394.     telAllDNMsgs                = 0x0000000F,                    /* mask to all non tool specific dn events */
  395.                                                                 /* CA MESSAGE EVENTMASK CONSTANTS */
  396.     telCAAlertingMsg            = 0x00000001,                    /* CA is alerting  */
  397.     telCAOfferMsg                = 0x00000002,                    /* CA is being offered a call */
  398.     telCAProgressMsg            = 0x00000004,                    /* call progress info for this CA */
  399.     telCAOutgoingMsg            = 0x00000008,                    /* CA is initiating an outgoing call */
  400.     telCADisconnectMsg            = 0x00000010,                    /* CA disconnected (dropped or rmt disc */
  401.     telCAActiveMsg                = 0x00000020,                    /* CA is active and voice/data is free */
  402.                                                                 /* to flow end to end */
  403.     telCAConferenceMsg            = 0x00000040,                    /* conference activity on CA */
  404.     telCATransferMsg            = 0x00000080,                    /* transfer feature activity */
  405.     telCAHoldMsg                = 0x00000100,                    /* hold feature activity */
  406.     telCADigitsMsg                = 0x00000200,                    /* remote signaling digits arrived */
  407.     telCACallParkMsg            = 0x00000400,                    /* CA call park feature activity */
  408.     telCACallbackMsg            = 0x00000800,                    /* CA call back feature activity  */
  409.     telCARejectMsg                = 0x00001000,                    /* CA is rejected */
  410.     telCADeflectMsg                = 0x00002000,                    /* CA is deflected */
  411.     telCAForwardMsg                = 0x00004000,                    /* CA is forwarded to this DN  */
  412.     telCAConferenceSplitMsg        = 0x00008000,                    /* conference split activity  */
  413.     telCAConferenceDropMsg        = 0x00010000,                    /* conference drop activity  */
  414.     telCAQueuedMsg                = 0x00020000,                    /* CA has been queued  */
  415.     telCAInUseMsg                = 0x00040000,                    /* CA is in use  */
  416.     telCACallPickupMsg            = 0x00080000,                    /* CA pickup activity */
  417.     telCAPagingMsg                = 0x00100000,                    /* CA paging activity */
  418.     telCAIntercomMsg            = 0x00200000,                    /* CA intercom activity */
  419.     telCAModemToneMsg            = 0x00400000,                    /* modem tones detected */
  420.     telCAFaxToneMsg                = 0x00800000,                    /* fax tones detected */
  421.     telCAIdleMsg                = 0x01000000,                    /* CA is in idle state */
  422.     telCASuccessiveAlertMsg        = 0x02000000,                    /* phone is alerting, one per ring */
  423.     telCAUserUserInfoMsg        = 0x04000000,                    /* user to user information has arrrived */
  424.                                                                 /* for this CA */
  425.     telCAHandOffMsg                = 0x08000000,                    /* CA is ready for hand-off */
  426.     telCAVoiceDetectedMsg        = 0x10000000,                    /* voice Detect related event */
  427.     telCASilenceDetectedMsg        = 0x20000000,                    /* silence Detect related event */
  428.     telCADigitsImmMsg            = 0x40000000,                    /* immidiate arrival of remote signaling digits */
  429.     telCAOtherMsg                = (long)0x80000000,                /* tool specific CA message */
  430.     telAllCAMsgs                = 0x7FFFFFFF                    /* mask to all non tool specific CA events */
  431. };
  432.  
  433. typedef OSErr                             TELErr;
  434. typedef unsigned long                     TELFlags;
  435.  
  436. enum {
  437.     telNoMenus                    = 1L << 16,                        /* tells tool not to display any custom menus */
  438.     telQuiet                    = 1L << 17,                        /* tells tool not to display any dialog boxes or alerts */
  439.     telConfigChanged            = 1L << 18                        /* notifies application that the config has changed */
  440. };
  441.  
  442. typedef unsigned long                     TELFeatureFlags;
  443.  
  444. enum {
  445.     pcmAvail                    = 1L << 0,                        /* true if PCM voice data accessible */
  446.     hasHandset                    = 1L << 1,                        /* true if a phone handset is attached  */
  447.     hasSpeakerphone                = 1L << 2,                        /* true if a 2 way speakerphone is attached */
  448.     canOnHookDial                = 1L << 3,                        /* can on-hook dial */
  449.     hasRinger                    = 1L << 4,                        /* terminal has its own ringer */
  450.     canSetDisplay                = 1L << 5,                        /* application can write to the display */
  451.     hasKeypad                    = 1L << 6,                        /* attached phone has standard 12 key pad */
  452.     hasVideo                    = 1L << 7,                        /* terminal has a videophone */
  453.     hasOther                    = 1L << 8,                        /* reserved for future use */
  454.     crossDNConference            = 1L << 9,                        /* can perform cross-DN conferences */
  455.     hasSubaddress                = 1L << 10,                        /* attached network supports subaddressing */
  456.     hasUserUserInfo                = 1L << 11,                        /* network supports user-to-user info */
  457.     hasHandsetSoundStreams        = 1L << 12,                        /* sound streams are supported on the handset */
  458.     hasIndHandset                = 1L << 13,                        /* handset can be accessed independently of the phone line */
  459.     hasBuiltinSpeakerphone        = 1L << 14                        /* speaker and microphone of the Mac can be used */
  460. };
  461.  
  462.  
  463.  
  464. struct TELTermRecord {
  465.  
  466.     short                             tRef;
  467.     TELFeatureFlags                 featureFlags;
  468.     short                             handsetSpeakerVol;
  469.     short                             handsetMicVol;
  470.     short                             speakerphoneVol;
  471.     short                             speakerphoneMicVol;
  472.     short                             ringerVol;
  473.     short                             otherVol;
  474.     short                             ringerTypes;
  475.     short                             hasDisplay;
  476.     short                             displayRows;
  477.     short                             numDNs;
  478.     short                             maxAllocCA;
  479.     short                             curAllocCA;
  480.     short                             builtinSpeakerVol;
  481.     short                             builtinSpeakerMicVol;
  482.     long                             reserved;
  483. };
  484. typedef struct TELTermRecord            TELTermRecord;
  485.  
  486. typedef TELTermRecord *                    TELTermPtr;
  487.  
  488. struct TELRecord {
  489.     short                             procID;
  490.  
  491.     TELFlags                         flags;
  492.     short                             reserved;
  493.  
  494.     long                             refCon;
  495.     long                             userData;
  496.  
  497.     UniversalProcPtr                 defproc;
  498.  
  499.     Ptr                             config;
  500.     Ptr                             oldConfig;
  501.  
  502.     TELTermPtr                         pTELTerm;
  503.  
  504.     long                             telPrivate;
  505.     long                             reserved1;
  506.     long                             reserved2;
  507.  
  508.     long                             pTELTermSize;
  509.     short                             version;
  510.  
  511. };
  512. typedef struct TELRecord                TELRecord;
  513.  
  514. typedef TELRecord *                        TELPtr;
  515. typedef TELPtr *                        TELHandle;
  516. typedef unsigned long                     TELDNFeatureFlags;
  517.  
  518. enum {
  519.     dndSub                        = 1L << 0,                        /* do not disturb subscribed */
  520.     dndAvail                    = 1L << 1,                        /* do not disturb available */
  521.     dndActive                    = 1L << 2,                        /* do not disturb active */
  522.     voiceMailAccessSub            = 1L << 3,                        /* message waiting subscribed */
  523.     voiceMailAccessAvail        = 1L << 4,                        /* message waiting available */
  524.     voiceMailAccessActive        = 1L << 5,                        /* message waiting active */
  525.     pagingSub                    = 1L << 6,                        /* paging is subscribed */
  526.     pagingAvail                    = 1L << 7,                        /* paging is available */
  527.     pagingActive                = 1L << 8,                        /* paging is active */
  528.     intercomSub                    = 1L << 9,                        /* intercom is subscribed */
  529.     intercomAvail                = 1L << 10,                        /* intercom is available */
  530.     intercomActive                = 1L << 11,                        /* intercom is active */
  531.     dnSelectSub                    = 1L << 12,                        /* DN select is subscribed */
  532.     dnSelectAvail                = 1L << 13,                        /* DN select is available */
  533.     dnSelectActive                = 1L << 14,                        /* DN is selected */
  534.     callPickupSub                = 1L << 15,                        /* call pickup is subscribed */
  535.     callPickupAvail                = 1L << 16,                        /* call pickup is available */
  536.     dnInUse                        = 1L << 17,                        /* a CA is allocated for this DN */
  537.     logicalDN                    = 1L << 18,                        /* this DN is not on this terminal */
  538.     dnAccessible                = 1L << 19,                        /* commands can be sent to this DN */
  539.     canInitiate                    = 1L << 20,                        /* an outgoing CA can be initiated */
  540.     voiceMessageWaiting            = 1L << 21,                        /* voice mail waiting for this dn */
  541.     hasDNSoundStreams            = 1L << 22,                        /* sound streams are supported on this DN */
  542.     autoAnswerAvail                = 1L << 23,                        /* AutoAnswer is set for this DN */
  543.     autoAnswerActive            = 1L << 24,                        /* AutoAnswer is currently applied to CA on this DN */
  544.     tollSaverAvail                = 1L << 25,                        /* tollSaver is set for this DN */
  545.     tollSaverActive                = 1L << 26                        /* tollSaver is currently applied to CA on this DN */
  546. };
  547.  
  548. typedef unsigned long                     TELDNForwardFlags;
  549.  
  550. enum {
  551.     immediateForwardSub            = 1L << 0,                        /* immediate call forward subscribed */
  552.     immediateForwardAvail        = 1L << 1,                        /* immediate call forward available */
  553.     immediateForwardActive        = 1L << 2,                        /* immediate call forward active */
  554.     busyForwardSub                = 1L << 3,                        /* forward on busy subscribed */
  555.     busyForwardAvail            = 1L << 4,                        /* forward on busy available */
  556.     busyForwardActive            = 1L << 5,                        /* forward on busy active */
  557.     noAnswerForwardSub            = 1L << 6,                        /* no answer call forward subscribed */
  558.     noAnswerForwardAvail        = 1L << 7,                        /* no answer call forward available */
  559.     noAnswerForwardActive        = 1L << 8,                        /* no answer call forward active */
  560.     busyNAForwardSub            = 1L << 9,                        /* busy & no answer call forward subscribed */
  561.     busyNAForwardAvail            = 1L << 10,                        /* busy & no answer call forward available */
  562.     busyNAForwardActive            = 1L << 11                        /* busy & no answer call forward active */
  563. };
  564.  
  565.  
  566.  
  567. struct TELDNRecord {
  568.  
  569.     short                             dnRef;
  570.     StringPtr                         dn;
  571.     StringPtr                         dnPartyName;
  572.     StringPtr                         dnSubaddress;
  573.     TELHandle                         hTEL;
  574.     short                             maxAllocCA;
  575.     short                             curAllocCA;
  576.     short                             dnType;
  577.     TELDNFeatureFlags                 featureFlags;
  578.     short                             numPageIDs;
  579.     short                             numIntercomIDs;
  580.     short                             numPickupIDs;
  581.     TELDNForwardFlags                 forwardFlags;
  582.     StringPtr                         iForwardDN;
  583.     StringPtr                         iForwardSubaddress;
  584.     StringPtr                         iForwardPartyName;
  585.     StringPtr                         bForwardDN;
  586.     StringPtr                         bForwardSubaddress;
  587.     StringPtr                         bForwardPartyName;
  588.     StringPtr                         naForwardDN;
  589.     StringPtr                         naForwardSubaddress;
  590.     StringPtr                         naForwardPartyName;
  591.     short                             naForwardRings;
  592.     long                             telDNPrivate;
  593.     long                             refCon;
  594.     long                             userData;
  595.     long                             reserved;
  596. };
  597. typedef struct TELDNRecord                TELDNRecord;
  598.  
  599. typedef TELDNRecord *                    TELDNPtr;
  600. typedef TELDNPtr *                        TELDNHandle;
  601. typedef unsigned long                     TELCAFeatureFlags;
  602.  
  603. enum {
  604.     holdSub                        = 1L << 0,                        /* hold subscribed  */
  605.     holdAvail                    = 1L << 1,                        /* hold available  */
  606.     holdActive                    = 1L << 2,                        /* hold active  */
  607.     conferenceSub                = 1L << 3,                        /* conference subscribed */
  608.     conferenceAvail                = 1L << 4,                        /* conference available */
  609.     conferenceActive            = 1L << 5,                        /* conference active  */
  610.     conferenceDropSub            = 1L << 6,                        /* conference drop subscribed  */
  611.     conferenceDropAvail            = 1L << 7,                        /* a call to TELDrop will drop this */
  612.                                                                 /* CA only from a conference */
  613.     conferenceSplitSub            = 1L << 8,                        /* conference split subscribed  */
  614.     conferenceSplitAvail        = 1L << 9,                        /* conference split available for this CA */
  615.     numToConferenceRequired        = 1L << 10,                        /* the number of CAs to be conferenced is */
  616.                                                                 /* required in TELConfPrep  */
  617.     transferSub                    = 1L << 11,                        /* transfer subscribed  */
  618.     transferAvail                = 1L << 12,                        /* transfer available  */
  619.     transferActive                = 1L << 13,                        /* transfer active */
  620.     caRelated                    = 1L << 14                        /* this CA is the specified in some other CA's relatedCA field*/
  621. };
  622.  
  623. typedef unsigned long                     TELCAOtherFeatures;
  624.  
  625. enum {
  626.     callbackSub                    = 1L << 0,                        /* call back subscribed */
  627.     callbackAvail                = 1L << 1,                        /* call back available */
  628.     callbackActive                = 1L << 2,                        /* call back active  */
  629.     callbackClearSub            = 1L << 3,                        /* call back clearing subscribed */
  630.     callbackNowSub                = 1L << 4,                        /* call back now subscribed */
  631.     callbackNowAvail            = 1L << 5,                        /* call back now available  */
  632.     callbackBusy                = 1L << 6,                        /* call back on busy */
  633.     callbackNoAnswer            = 1L << 7,                        /* call back on no answer */
  634.     callbackReturnsRef            = 1L << 8,                        /* call back returns a reference */
  635.     parkSub                        = 1L << 9,                        /* call park subscribed */
  636.     parkAvail                    = 1L << 10,                        /* call park available */
  637.     parkActive                    = 1L << 11,                        /* call park active */
  638.     parkRetrieveSub                = 1L << 12,                        /* call park retrieve subscribed */
  639.     parkRetrieveWithID            = 1L << 13,                        /* retrieve parked calls with IDs */
  640.     parkWithReturnedID            = 1L << 14,                        /* park call to a specific remote ID */
  641.     parkWithGivenID                = 1L << 18,                        /* for switch that requires ID for parking */
  642.     rejectable                    = 1L << 15,                        /* CA is rejectable  */
  643.     deflectable                    = 1L << 16,                        /* CA is deflectable  */
  644.     acceptable                    = 1L << 17,                        /* CA is acceptable */
  645.     voiceDetected                = 1L << 19,                        /* voice has been detected on this CA incase of */
  646.                                                                 /* an incoming call */
  647.     callAnswdTSRings            = 1L << 20                        /* incoimng call was answered on TollSaver rings */
  648. };
  649.  
  650. typedef struct TELCARecord                 TELCARecord;
  651. typedef TELCARecord *                    TELCAPtr;
  652. typedef TELCAPtr *                        TELCAHandle;
  653.  
  654. struct TELCARecord {
  655.     short                             caRef;
  656.     TELDNHandle                     hTELDN;
  657.     TELHandle                         hTEL;
  658.     short                             caState;
  659.     TELCAHandle                     relatedCA;
  660.     long                             connectTime;                /* can be used by application to keep track of connect time */
  661.     short                             intExt;
  662.     short                             callType;
  663.     short                             dialType;
  664.     short                             bearerType;
  665.     short                             rate;
  666.     StringPtr                         rmtDN;
  667.     StringPtr                         rmtPartyName;
  668.     StringPtr                         rmtSubaddress;
  669.     StringPtr                         routeDN;
  670.     StringPtr                         routePartyName;
  671.     StringPtr                         routeSubaddress;
  672.     short                             priority;
  673.     short                             conferenceLimit;
  674.     TELCAFeatureFlags                 featureFlags;
  675.     TELCAOtherFeatures                 otherFeatures;
  676.     long                             telCAPrivate;
  677.     long                             refCon;
  678.     long                             userData;
  679.     long                             reserved;
  680. };
  681.  
  682. /* Constants for HandleType in structure above */
  683.  
  684. enum {
  685.     telHandleType                = 0,                            /* feature requires a terminal handle */
  686.     telDNHandleType                = 1,                            /* feature requires a DN handle */
  687.     telCAHandleType                = 2                                /* feature requires a CA handle */
  688. };
  689.  
  690.  
  691. struct FeatureList {
  692.     short                             featureID;
  693.     StringPtr                         featureName;
  694.     short                             handleType;
  695.     struct FeatureList *            nextFeature;
  696. };
  697. typedef struct FeatureList                FeatureList;
  698. typedef FeatureList *                    FeatureListPtr;
  699. /* CA MESSAGE STRUCTURES FOR MSGINFO */
  700.  
  701. struct CAGenericMsgRec {
  702.     StringPtr                         rmtDN;
  703.     StringPtr                         rmtName;
  704.     StringPtr                         rmtSubaddress;
  705.     short                             dialType;
  706. };
  707. typedef struct CAGenericMsgRec            CAGenericMsgRec;
  708.  
  709. struct CAUserUserInfoMsgRec {
  710.     StringPtr                         userUserInfo;
  711. };
  712. typedef struct CAUserUserInfoMsgRec        CAUserUserInfoMsgRec;
  713.  
  714. struct CAConfMsgRec {
  715.     TELCAHandle                     relatedCA;
  716. };
  717. typedef struct CAConfMsgRec                CAConfMsgRec;
  718.  
  719. struct CATransfMsgRec {
  720.     StringPtr                         rmtDN;
  721.     StringPtr                         rmtName;
  722.     StringPtr                         rmtSubaddress;
  723.     short                             dialType;
  724.     TELCAHandle                     prepCA;
  725. };
  726. typedef struct CATransfMsgRec            CATransfMsgRec;
  727. typedef CALLBACK_API( void , TelephoneTermMsgProcPtr )(TELHandle hTEL, long msg, short mtype, short value, long globals);
  728. typedef CALLBACK_API( void , TelephoneDNMsgProcPtr )(TELDNHandle hTELDN, long Msg, short mtype, short value, ConstStr255Param rmtDN, ConstStr255Param rmtName, ConstStr255Param rmtSubaddress, long globals);
  729. typedef CALLBACK_API( void , TelephoneCAMsgProcPtr )(TELCAHandle hTELCA, long Msg, short mtype, short value, Ptr Msginfo, long globals);
  730. typedef CALLBACK_API( void , TelephoneChooseIdleProcPtr )(void );
  731. typedef STACK_UPP_TYPE(TelephoneTermMsgProcPtr)                 TelephoneTermMsgUPP;
  732. typedef STACK_UPP_TYPE(TelephoneDNMsgProcPtr)                     TelephoneDNMsgUPP;
  733. typedef STACK_UPP_TYPE(TelephoneCAMsgProcPtr)                     TelephoneCAMsgUPP;
  734. typedef STACK_UPP_TYPE(TelephoneChooseIdleProcPtr)                 TelephoneChooseIdleUPP;
  735. enum { uppTelephoneTermMsgProcInfo = 0x0000EBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes) */
  736. enum { uppTelephoneDNMsgProcInfo = 0x003FEBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  737. enum { uppTelephoneCAMsgProcInfo = 0x0003EBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  738. enum { uppTelephoneChooseIdleProcInfo = 0x00000000 };             /* pascal no_return_value Func() */
  739. #define NewTelephoneTermMsgProc(userRoutine)                     (TelephoneTermMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneTermMsgProcInfo, GetCurrentArchitecture())
  740. #define NewTelephoneDNMsgProc(userRoutine)                         (TelephoneDNMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneDNMsgProcInfo, GetCurrentArchitecture())
  741. #define NewTelephoneCAMsgProc(userRoutine)                         (TelephoneCAMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneCAMsgProcInfo, GetCurrentArchitecture())
  742. #define NewTelephoneChooseIdleProc(userRoutine)                 (TelephoneChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneChooseIdleProcInfo, GetCurrentArchitecture())
  743. #define CallTelephoneTermMsgProc(userRoutine, hTEL, msg, mtype, value, globals)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppTelephoneTermMsgProcInfo, (hTEL), (msg), (mtype), (value), (globals))
  744. #define CallTelephoneDNMsgProc(userRoutine, hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals)  CALL_EIGHT_PARAMETER_UPP((userRoutine), uppTelephoneDNMsgProcInfo, (hTELDN), (Msg), (mtype), (value), (rmtDN), (rmtName), (rmtSubaddress), (globals))
  745. #define CallTelephoneCAMsgProc(userRoutine, hTELCA, Msg, mtype, value, Msginfo, globals)  CALL_SIX_PARAMETER_UPP((userRoutine), uppTelephoneCAMsgProcInfo, (hTELCA), (Msg), (mtype), (value), (Msginfo), (globals))
  746. #define CallTelephoneChooseIdleProc(userRoutine)                 CALL_ZERO_PARAMETER_UPP((userRoutine), uppTelephoneChooseIdleProcInfo)
  747. EXTERN_API( TELErr )
  748. InitTEL                            (void);
  749.  
  750. EXTERN_API( TELErr )
  751. TELGetInfo                        (TELHandle                 hTEL);
  752.  
  753. EXTERN_API( TELErr )
  754. TELOpenTerm                        (TELHandle                 hTEL);
  755.  
  756. EXTERN_API( TELErr )
  757. TELResetTerm                    (TELHandle                 hTEL);
  758.  
  759. EXTERN_API( TELErr )
  760. TELCloseTerm                    (TELHandle                 hTEL);
  761.  
  762. EXTERN_API( TELErr )
  763. TELTermMsgHand                    (TELHandle                 hTEL,
  764.                                  long                     eventMask,
  765.                                  TelephoneTermMsgUPP     msgProc,
  766.                                  long                     globals);
  767.  
  768. EXTERN_API( TELErr )
  769. TELClrTermMsgHand                (TELHandle                 hTEL,
  770.                                  TelephoneTermMsgUPP     msgProc);
  771.  
  772. EXTERN_API( TELErr )
  773. TELTermEventsSupp                (TELHandle                 hTEL,
  774.                                  long *                    eventMask);
  775.  
  776. EXTERN_API( short )
  777. TELGetProcID                    (Str255                 name);
  778.  
  779. EXTERN_API( TELHandle )
  780. TELNew                            (short                     procID,
  781.                                  TELFlags                 flags,
  782.                                  long                     refCon,
  783.                                  long                     userData);
  784.  
  785. EXTERN_API( TELHandle )
  786. TELNewWithResult                (short                     procID,
  787.                                  TELFlags                 flags,
  788.                                  long                     refCon,
  789.                                  long                     userData,
  790.                                  TELErr *                error);
  791.  
  792. EXTERN_API( TELErr )
  793. TELDefault                        (Ptr *                    theConfig,
  794.                                  short                     procID,
  795.                                  Boolean                 allocate);
  796.  
  797. EXTERN_API( Boolean )
  798. TELValidate                        (TELHandle                 hTEL);
  799.  
  800. EXTERN_API( Ptr )
  801. TELGetConfig                    (TELHandle                 hTEL);
  802.  
  803. EXTERN_API( short )
  804. TELSetConfig                    (TELHandle                 hTEL,
  805.                                  Ptr                     thePtr);
  806.  
  807. EXTERN_API( TELErr )
  808. TELChoose                        (TELHandle *            hTEL,
  809.                                  Point                     where,
  810.                                  TelephoneChooseIdleUPP  idleProc);
  811.  
  812. EXTERN_API( Handle )
  813. TELSetupPreflight                (short                     procID,
  814.                                  long *                    magicCookie);
  815.  
  816. EXTERN_API( void )
  817. TELSetupSetup                    (short                     procID,
  818.                                  Ptr                     theConfig,
  819.                                  short                     count,
  820.                                  DialogPtr                 theDialog,
  821.                                  long *                    magicCookie);
  822.  
  823. EXTERN_API( Boolean )
  824. TELSetupFilter                    (short                     procID,
  825.                                  Ptr                     theConfig,
  826.                                  short                     count,
  827.                                  DialogPtr                 theDialog,
  828.                                  EventRecord *            theEvent,
  829.                                  short *                theItem,
  830.                                  long *                    magicCookie);
  831.  
  832. EXTERN_API( void )
  833. TELSetupItem                    (short                     procID,
  834.                                  Ptr                     theConfig,
  835.                                  short                     count,
  836.                                  DialogPtr                 theDialog,
  837.                                  short *                theItem,
  838.                                  long *                    magicCookie);
  839.  
  840. EXTERN_API( void )
  841. TELSetupCleanup                    (short                     procID,
  842.                                  Ptr                     theConfig,
  843.                                  short                     count,
  844.                                  DialogPtr                 theDialog,
  845.                                  long *                    magicCookie);
  846.  
  847. EXTERN_API( void )
  848. TELSetupXCleanup                (short                     procID,
  849.                                  Ptr                     theConfig,
  850.                                  short                     count,
  851.                                  DialogPtr                 theDialog,
  852.                                  Boolean                 OKed,
  853.                                  long *                    magicCookie);
  854.  
  855. EXTERN_API( void )
  856. TELSetupPostflight                (short                     procID);
  857.  
  858. EXTERN_API( TELErr )
  859. TELDispose                        (TELHandle                 hTEL);
  860.  
  861. EXTERN_API( short )
  862. TELCountDNs                        (TELHandle                 hTEL,
  863.                                  short                     dnType,
  864.                                  Boolean                 physical);
  865.  
  866. EXTERN_API( TELErr )
  867. TELDNLookupByIndex                (TELHandle                 hTEL,
  868.                                  short                     dnType,
  869.                                  Boolean                 physical,
  870.                                  short                     index,
  871.                                  TELDNHandle *            hTELDN);
  872.  
  873. EXTERN_API( TELErr )
  874. TELDNLookupByName                (TELHandle                 hTEL,
  875.                                  ConstStr255Param         DN,
  876.                                  TELDNHandle *            hTELDN);
  877.  
  878. EXTERN_API( TELErr )
  879. TELDNSelect                        (TELDNHandle             hTELDN,
  880.                                  Boolean                 select);
  881.  
  882. EXTERN_API( TELErr )
  883. TELDNDispose                    (TELDNHandle             hTELDN);
  884.  
  885. EXTERN_API( TELErr )
  886. TELGetDNInfo                    (TELDNHandle             hTELDN);
  887.  
  888. EXTERN_API( TELErr )
  889. TELGetDNFlags                    (TELDNHandle             hTELDN,
  890.                                  long *                    dnFeatureFlags,
  891.                                  long *                    dnForwardFlags);
  892.  
  893. EXTERN_API( TELErr )
  894. TELDNMsgHand                    (TELDNHandle             hTELDN,
  895.                                  Boolean                 allDNs,
  896.                                  long                     eventMask,
  897.                                  TelephoneDNMsgUPP         msgProc,
  898.                                  long                     globals);
  899.  
  900. EXTERN_API( TELErr )
  901. TELClrDNMsgHand                    (TELDNHandle             hTELDN,
  902.                                  TelephoneDNMsgUPP         msgProc);
  903.  
  904. EXTERN_API( TELErr )
  905. TELDNEventsSupp                    (TELDNHandle             hTELDN,
  906.                                  long *                    eventMask);
  907.  
  908. EXTERN_API( short )
  909. TELCountCAs                        (TELDNHandle             hTELDN,
  910.                                  short                     internalExternal);
  911.  
  912. EXTERN_API( TELErr )
  913. TELCALookup                        (TELDNHandle             hTELDN,
  914.                                  short                     internalExternal,
  915.                                  short                     index,
  916.                                  TELCAHandle *            hTELCA);
  917.  
  918. EXTERN_API( TELErr )
  919. TELCADispose                    (TELCAHandle             hTELCA);
  920.  
  921. EXTERN_API( TELErr )
  922. TELGetCAState                    (TELCAHandle             hTELCA,
  923.                                  short *                state);
  924.  
  925. EXTERN_API( TELErr )
  926. TELGetCAFlags                    (TELCAHandle             hTELCA,
  927.                                  long *                    caFeatureFlags,
  928.                                  long *                    caOtherFeatures);
  929.  
  930. EXTERN_API( TELErr )
  931. TELGetCAInfo                    (TELCAHandle             hTELCA);
  932.  
  933. EXTERN_API( TELErr )
  934. TELCAMsgHand                    (TELDNHandle             hTELDN,
  935.                                  long                     eventMask,
  936.                                  TelephoneCAMsgUPP         msgProc,
  937.                                  long                     globals);
  938.  
  939. EXTERN_API( TELErr )
  940. TELClrCAMsgHand                    (TELDNHandle             hTELDN,
  941.                                  TelephoneCAMsgUPP         msgProc);
  942.  
  943. EXTERN_API( TELErr )
  944. TELCAEventsSupp                    (TELDNHandle             hTELDN,
  945.                                  long *                    eventMask);
  946.  
  947. EXTERN_API( TELErr )
  948. TELSetupCall                    (TELDNHandle             hTELDN,
  949.                                  TELCAHandle *            hTELCA,
  950.                                  ConstStr255Param         destDN,
  951.                                  ConstStr255Param         destName,
  952.                                  ConstStr255Param         destSubaddress,
  953.                                  ConstStr255Param         userUserInfo,
  954.                                  short                     bearerType,
  955.                                  short                     rate);
  956.  
  957. EXTERN_API( TELErr )
  958. TELConnect                        (TELCAHandle             hTELCA);
  959.  
  960. EXTERN_API( TELErr )
  961. TELDialDigits                    (TELCAHandle             hTELCA,
  962.                                  ConstStr255Param         digits);
  963.  
  964. EXTERN_API( TELErr )
  965. TELAcceptCall                    (TELCAHandle             hTELCA);
  966.  
  967. EXTERN_API( TELErr )
  968. TELRejectCall                    (TELCAHandle             hTELCA,
  969.                                  short                     reason);
  970.  
  971. EXTERN_API( TELErr )
  972. TELDeflectCall                    (TELCAHandle             hTELCA,
  973.                                  ConstStr255Param         rmtDN,
  974.                                  ConstStr255Param         rmtName,
  975.                                  ConstStr255Param         rmtSubaddress);
  976.  
  977. EXTERN_API( TELErr )
  978. TELAnswerCall                    (TELCAHandle             hTELCA);
  979.  
  980. EXTERN_API( TELErr )
  981. TELDrop                            (TELCAHandle             hTELCA,
  982.                                  ConstStr255Param         userUserInfo);
  983.  
  984. EXTERN_API( TELErr )
  985. TELHold                            (TELCAHandle             hTELCA);
  986.  
  987. EXTERN_API( TELErr )
  988. TELRetrieve                        (TELCAHandle             hTELCA);
  989.  
  990. EXTERN_API( TELErr )
  991. TELConferencePrep                (TELCAHandle             hTELCA1,
  992.                                  TELCAHandle             hTELCA2,
  993.                                  short                     numToConference);
  994.  
  995. EXTERN_API( TELErr )
  996. TELConferenceEstablish            (TELCAHandle             hTELCA1,
  997.                                  TELCAHandle             hTELCA2);
  998.  
  999. EXTERN_API( TELErr )
  1000. TELConferenceSplit                (TELCAHandle             hTELCA);
  1001.  
  1002. EXTERN_API( TELErr )
  1003. TELTransferPrep                    (TELCAHandle             hTELCA1,
  1004.                                  TELCAHandle             hTELCA2);
  1005.  
  1006. EXTERN_API( TELErr )
  1007. TELTransferEstablish            (TELCAHandle             hTELCA1,
  1008.                                  TELCAHandle             hTELCA2);
  1009.  
  1010. EXTERN_API( TELErr )
  1011. TELTransferBlind                (TELCAHandle             hTELCA,
  1012.                                  ConstStr255Param         rmtDN,
  1013.                                  ConstStr255Param         rmtName,
  1014.                                  ConstStr255Param         rmtSubaddress);
  1015.  
  1016. EXTERN_API( TELErr )
  1017. TELForwardSet                    (TELDNHandle             hTELDN,
  1018.                                  ConstStr255Param         forwardDN,
  1019.                                  ConstStr255Param         forwardName,
  1020.                                  ConstStr255Param         forwardSubaddress,
  1021.                                  short                     forwardType,
  1022.                                  short                     numrings);
  1023.  
  1024. EXTERN_API( TELErr )
  1025. TELForwardClear                    (TELDNHandle             hTELDN,
  1026.                                  short                     forwardType);
  1027.  
  1028. EXTERN_API( TELErr )
  1029. TELCallbackSet                    (TELCAHandle             hTELCA,
  1030.                                  short *                callbackRef);
  1031.  
  1032. EXTERN_API( TELErr )
  1033. TELCallbackClear                (TELHandle                 hTEL,
  1034.                                  short                     callbackRef);
  1035.  
  1036. EXTERN_API( TELErr )
  1037. TELCallbackNow                    (TELCAHandle             hTELCA,
  1038.                                  short                     callbackRef);
  1039.  
  1040. EXTERN_API( TELErr )
  1041. TELDNDSet                        (TELDNHandle             hTELDN,
  1042.                                  short                     dndType);
  1043.  
  1044. EXTERN_API( TELErr )
  1045. TELDNDClear                        (TELDNHandle             hTELDN,
  1046.                                  short                     dndType);
  1047.  
  1048. EXTERN_API( TELErr )
  1049. TELCallPickup                    (TELCAHandle             hTELCA,
  1050.                                  ConstStr255Param         pickupDN,
  1051.                                  short                     pickupGroupID);
  1052.  
  1053. EXTERN_API( TELErr )
  1054. TELParkCall                        (TELCAHandle             hTELCA,
  1055.                                  StringPtr *            parkRetrieveID,
  1056.                                  ConstStr255Param         parkID);
  1057.  
  1058. EXTERN_API( TELErr )
  1059. TELRetrieveParkedCall            (TELCAHandle             hTELCA,
  1060.                                  ConstStr255Param         parkRetrieveID);
  1061.  
  1062. EXTERN_API( TELErr )
  1063. TELVoiceMailAccess                (TELCAHandle             hTELCA);
  1064.  
  1065. EXTERN_API( TELErr )
  1066. TELPaging                        (TELCAHandle             hTELCA,
  1067.                                  short                     pageID);
  1068.  
  1069. EXTERN_API( TELErr )
  1070. TELIntercom                        (TELCAHandle             hTELCA,
  1071.                                  short                     intercomID);
  1072.  
  1073. EXTERN_API( TELErr )
  1074. TELOtherFeatureList                (TELHandle                 hTEL,
  1075.                                  FeatureListPtr *        fList);
  1076.  
  1077. EXTERN_API( TELErr )
  1078. TELOtherFeatureImplement        (TELHandle                 hTEL,
  1079.                                  Handle                 theHandle,
  1080.                                  short                     featureID);
  1081.  
  1082. EXTERN_API( TELErr )
  1083. TELToolFunctions                (TELHandle                 hTEL,
  1084.                                  short                     msgcode,
  1085.                                  Boolean *                supportsIt);
  1086.  
  1087. EXTERN_API( TELErr )
  1088. TELOtherFunction                (TELHandle                 hTEL,
  1089.                                  Ptr                     paramblock,
  1090.                                  long                     size);
  1091.  
  1092. EXTERN_API( TELErr )
  1093. TELGetHooksw                    (TELHandle                 hTEL,
  1094.                                  short                     hookType,
  1095.                                  Boolean *                offHook);
  1096.  
  1097. EXTERN_API( TELErr )
  1098. TELSetHooksw                    (TELHandle                 hTEL,
  1099.                                  short                     hookType,
  1100.                                  Boolean                 offHook);
  1101.  
  1102. EXTERN_API( TELErr )
  1103. TELGetVolume                    (TELHandle                 hTEL,
  1104.                                  short                     volType,
  1105.                                  short *                level,
  1106.                                  short *                volState);
  1107.  
  1108. EXTERN_API( TELErr )
  1109. TELSetVolume                    (TELHandle                 hTEL,
  1110.                                  short                     volType,
  1111.                                  short *                level,
  1112.                                  short                     volState);
  1113.  
  1114. EXTERN_API( TELErr )
  1115. TELAlert                        (TELHandle                 hTEL,
  1116.                                  short *                level,
  1117.                                  short                     alertPattern);
  1118.  
  1119. EXTERN_API( TELErr )
  1120. TELGetDisplay                    (TELHandle                 hTEL,
  1121.                                  short                     index,
  1122.                                  short *                displayMode,
  1123.                                  StringPtr *            text);
  1124.  
  1125. EXTERN_API( TELErr )
  1126. TELSetDisplay                    (TELHandle                 hTEL,
  1127.                                  short                     index,
  1128.                                  short                     displayMode,
  1129.                                  ConstStr255Param         text);
  1130.  
  1131. EXTERN_API( void )
  1132. TELIdle                            (TELHandle                 hTEL);
  1133.  
  1134. EXTERN_API( void )
  1135. TELActivate                        (TELHandle                 hTEL,
  1136.                                  Boolean                 activate);
  1137.  
  1138. EXTERN_API( void )
  1139. TELResume                        (TELHandle                 hTEL,
  1140.                                  Boolean                 resume);
  1141.  
  1142. EXTERN_API( Boolean )
  1143. TELMenu                            (TELHandle                 hTEL,
  1144.                                  short                     menuID,
  1145.                                  short                     item);
  1146.  
  1147. EXTERN_API( void )
  1148. TELEvent                        (TELHandle                 hTEL,
  1149.                                  const EventRecord *    theEvent);
  1150.  
  1151. EXTERN_API( void )
  1152. TELGetToolName                    (short                     procID,
  1153.                                  Str255                 name);
  1154.  
  1155. EXTERN_API( Handle )
  1156. TELGetVersion                    (TELHandle                 hTEL);
  1157.  
  1158. EXTERN_API( short )
  1159. TELGetTELVersion                (void);
  1160.  
  1161. EXTERN_API( TELErr )
  1162. TELIntlToEnglish                (TELHandle                 hTEL,
  1163.                                  Ptr                     inputPtr,
  1164.                                  Ptr *                    outputPtr,
  1165.                                  short                     language);
  1166.  
  1167. EXTERN_API( TELErr )
  1168. TELEnglishToIntl                (TELHandle                 hTEL,
  1169.                                  Ptr                     inputPtr,
  1170.                                  Ptr *                    outputPtr,
  1171.                                  short                     language);
  1172.  
  1173. EXTERN_API( TELErr )
  1174. TELGetDNSoundInput                (TELDNHandle             hTELDN,
  1175.                                  Str255                 deviceName);
  1176.  
  1177. EXTERN_API( TELErr )
  1178. TELDisposeDNSoundInput            (TELDNHandle             hTELDN,
  1179.                                  ConstStr255Param         deviceName);
  1180.  
  1181. EXTERN_API( TELErr )
  1182. TELGetDNSoundOutput                (TELDNHandle             hTELDN,
  1183.                                  Component *            SndOut);
  1184.  
  1185. EXTERN_API( TELErr )
  1186. TELDisposeDNSoundOutput            (TELDNHandle             hTELDN,
  1187.                                  Component                 SndOut);
  1188.  
  1189. EXTERN_API( TELErr )
  1190. TELGetHSSoundInput                (TELHandle                 termHand,
  1191.                                  Str255                 deviceName);
  1192.  
  1193. EXTERN_API( TELErr )
  1194. TELDisposeHSSoundInput            (TELHandle                 termHand,
  1195.                                  ConstStr255Param         deviceName);
  1196.  
  1197. EXTERN_API( TELErr )
  1198. TELGetHSSoundOutput                (TELHandle                 termHand,
  1199.                                  Component *            SndOut);
  1200.  
  1201. EXTERN_API( TELErr )
  1202. TELDisposeHSSoundOutput            (TELHandle                 termHand,
  1203.                                  Component                 SndOut);
  1204.  
  1205. EXTERN_API( TELErr )
  1206. TELDNSetAutoAnswer                (TELDNHandle             hTELDN,
  1207.                                  Boolean                 AutoAnswerOn);
  1208.  
  1209. EXTERN_API( TELErr )
  1210. TELDNTollSaverControl            (TELDNHandle             hTELDN,
  1211.                                  Boolean                 QuickAnswer);
  1212.  
  1213. EXTERN_API( TELErr )
  1214. TELSetIndHSConnect                (TELHandle                 termHand,
  1215.                                  Boolean                 Connect);
  1216.  
  1217. EXTERN_API( TELErr )
  1218. TELGetIndHSConnect                (TELHandle                 termHand,
  1219.                                  Boolean *                Connect);
  1220.  
  1221. EXTERN_API( TELErr )
  1222. TELCAVoiceDetect                (TELCAHandle             hTELCA,
  1223.                                  Boolean                 VoiceDetectOn);
  1224.  
  1225. EXTERN_API( TELErr )
  1226. TELCASilenceDetect                (TELCAHandle             hTELCA,
  1227.                                  Boolean                 DetectOn,
  1228.                                  long                     Period);
  1229.  
  1230. EXTERN_API( TELErr )
  1231. TELGetTelNewErr                    (void);
  1232.  
  1233. EXTERN_API( TELErr )
  1234. TELDNSetDTMF                    (TELDNHandle             hTELDN,
  1235.                                  Boolean                 dtmfOn);
  1236.  
  1237. EXTERN_API( TELErr )
  1238. TELDNGetDTMF                    (TELDNHandle             hTELDN,
  1239.                                  Boolean *                dtmfOn);
  1240.  
  1241. EXTERN_API( TELErr )
  1242. TELHSSetDTMF                    (TELHandle                 termHand,
  1243.                                  Boolean                 dtmfOn);
  1244.  
  1245. EXTERN_API( TELErr )
  1246. TELHSGetDTMF                    (TELHandle                 termHand,
  1247.                                  Boolean *                dtmfOn);
  1248.  
  1249. EXTERN_API( TELErr )
  1250. TELGetDNStatus                    (TELDNHandle             hTELDN,
  1251.                                  long *                    inUse);
  1252.  
  1253. EXTERN_API( TELErr )
  1254. TELGetDNProgressDet                (TELDNHandle             hTELDN,
  1255.                                  long                     selector,
  1256.                                  Boolean *                prgDetOn);
  1257.  
  1258. EXTERN_API( TELErr )
  1259. TELSetDNProgressDet                (TELDNHandle             hTELDN,
  1260.                                  long                     selector,
  1261.                                  Boolean                 prgDetOn);
  1262.  
  1263.  
  1264.  
  1265. #if PRAGMA_STRUCT_ALIGN
  1266.     #pragma options align=reset
  1267. #elif PRAGMA_STRUCT_PACKPUSH
  1268.     #pragma pack(pop)
  1269. #elif PRAGMA_STRUCT_PACK
  1270.     #pragma pack()
  1271. #endif
  1272.  
  1273. #ifdef PRAGMA_IMPORT_OFF
  1274. #pragma import off
  1275. #elif PRAGMA_IMPORT
  1276. #pragma import reset
  1277. #endif
  1278.  
  1279. #ifdef __cplusplus
  1280. }
  1281. #endif
  1282.  
  1283. #endif /* __TELEPHONES__ */
  1284.  
  1285.